using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using clf.weighing.entity;
using System.Data;
using System.Xml.Linq;

namespace weighing
{

    /// <summary>
    /// 磅单
    /// </summary>

    public class WeighingBillVo : BaseVo
    {
        #region Constract
        public WeighingBill mWeighingBill;
        public WeighingBillVo(WeighingBill weighingBill)
        {
            mWeighingBill = weighingBill;
        }
        #endregion


        public Int64 Id
        {
            get { return mWeighingBill.id; }
            set { mWeighingBill.id = value; OnPropertyChanged(this, nameof(Id)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String Number
        {
            get { return mWeighingBill.number; }
            set { mWeighingBill.number = value; OnPropertyChanged(this, nameof(Number)); }
        }

        /// <summary>
        /// 注释:类型 0 入库 1 出库 100外来过磅
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? Type
        {
            get { return mWeighingBill.type; }
            set { mWeighingBill.type = value; OnPropertyChanged(this, nameof(Type)); }
        }

        /// <summary>
        /// 注释:出入状态 0 未出场 1已经出场
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? Status
        {
            get { return mWeighingBill.status; }
            set { mWeighingBill.status = value; OnPropertyChanged(this, nameof(Status)); }
        }

        /// <summary>
        /// 注释:上传状态 0 未传 1 上传一次过磅 2 上传二次过磅
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? UpGovernmentStatus
        {
            get { return mWeighingBill.upGovernmentStatus; }
            set { mWeighingBill.upGovernmentStatus = value; OnPropertyChanged(this, nameof(UpGovernmentStatus)); }
        }

        /// <summary>
        /// 注释:上传数据到服务器 0 未传 1 上传一次过磅 2 上传二次过磅
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? UpOfficalStatus
        {
            get { return mWeighingBill.upOfficalStatus; }
            set { mWeighingBill.upOfficalStatus = value; OnPropertyChanged(this, nameof(UpOfficalStatus)); }
        }

        /// <summary>
        /// 注释:关联磅单的ID （出关联入，入关联出）
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int64? RelativeBillId
        {
            get { return mWeighingBill.relativeBillId; }
            set { mWeighingBill.relativeBillId = value; OnPropertyChanged(this, nameof(RelativeBillId)); }
        }


        public Int64? SendCompanyId
        {
            get { return mWeighingBill.sendCompanyId; }
            set { mWeighingBill.sendCompanyId = value; OnPropertyChanged(this, nameof(SendCompanyId)); }
        }

        public String SendCompanyName
        {
            get { return mWeighingBill.sendCompanyName; }
            set { mWeighingBill.sendCompanyName = value; OnPropertyChanged(this, nameof(SendCompanyName)); }
        }

        /// <summary>
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int64? SendYardId
        {
            get { return mWeighingBill.sendYardId; }
            set { mWeighingBill.sendYardId = value; OnPropertyChanged(this, nameof(SendYardId)); }
        }

        /// <summary>
        /// 注释:原发净重
        /// 可空:YES
        ///默认值:0.000
        /// </summary>

        public Decimal? SendNetWeight
        {
            get { return mWeighingBill.sendNetWeight; }
            set { mWeighingBill.sendNetWeight = value; OnPropertyChanged(this, nameof(SendNetWeight)); }
        }



        public String SendYardName
        {
            get { return mWeighingBill.sendYardName; }
            set { mWeighingBill.sendYardName = value; OnPropertyChanged(this, nameof(SendYardName)); }
        }


        public Int64? TranceCompanyId
        {
            get { return mWeighingBill.tranceCompanyId; }
            set { mWeighingBill.tranceCompanyId = value; OnPropertyChanged(this, nameof(TranceCompanyId)); }
        }

        public String TranceCompanyName
        {
            get { return mWeighingBill.tranceCompanyName; }
            set { mWeighingBill.tranceCompanyName = value; OnPropertyChanged(this, nameof(TranceCompanyName)); }
        }

        public DateTime? InTime
        {
            get { return mWeighingBill.inTime; }
            set { mWeighingBill.inTime = value; OnPropertyChanged(this, nameof(InTime)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public DateTime? OutTime
        {
            get { return mWeighingBill.outTime; }
            set { mWeighingBill.outTime = value; OnPropertyChanged(this, nameof(OutTime)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? UserId
        {
            get { return mWeighingBill.userId; }
            set { mWeighingBill.userId = value; OnPropertyChanged(this, nameof(UserId)); }
        }

        /// <summary>
        /// 注释:入场过磅员
        /// 可空:YES
        /// </summary>

        public String InUserName
        {
            get { return mWeighingBill.inUserName; }
            set
            {
                mWeighingBill.inUserName = value;
                OnPropertyChanged(this, nameof(InUserName));
            }
        }


        /// <summary>
        /// 注释:出场过磅员
        /// 可空:YES
        /// </summary>

        public String OutUserName
        {
            get { return mWeighingBill.outUserName; }
            set
            {
                mWeighingBill.outUserName = value;
                OnPropertyChanged(this, nameof(OutUserName));
            }
        }


        /// <summary>
        /// 注释:入场磅
        /// 可空:YES
        /// </summary>

        public String InScaleName
        {
            get { return mWeighingBill.inUserName; }
            set
            {
                mWeighingBill.inUserName = value;
                OnPropertyChanged(this, nameof(InScaleName));
            }
        }


        /// <summary>
        /// 注释:出场磅
        /// 可空:YES
        /// </summary>

        public String OutScaleName
        {
            get { return mWeighingBill.outUserName; }
            set
            {
                mWeighingBill.outUserName = value;
                OnPropertyChanged(this, nameof(OutScaleName));
            }
        }

        /// <summary>
        /// 注释:毛重
        /// 可空:YES
        ///默认值:0.000
        /// </summary>

        public Decimal? GrossWeight
        {
            get { return mWeighingBill.grossWeight; }
            set { mWeighingBill.grossWeight = value; OnPropertyChanged(this, nameof(GrossWeight)); }
        }

        /// <summary>
        /// 可空:YES
        ///默认值:0.000
        /// </summary>

        public Decimal? TraeWeight
        {
            get { return mWeighingBill.traeWeight; }
            set { mWeighingBill.traeWeight = value; OnPropertyChanged(this, nameof(TraeWeight)); }
        }

        /// <summary>
        /// 注释:净重
        /// 可空:YES
        ///默认值:0.000
        /// </summary>

        public Decimal? NetWeight
        {
            get { return mWeighingBill.netWeight; }
            set { mWeighingBill.netWeight = value; OnPropertyChanged(this, nameof(NetWeight)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? MaterialId
        {
            get { return mWeighingBill.materialId; }
            set
            {
                mWeighingBill.materialId = value;
                OnPropertyChanged(this, nameof(MaterialId));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String MaterialName
        {
            get { return mWeighingBill.materialName; }
            set
            {
                mWeighingBill.materialName = value;
                OnPropertyChanged(this, nameof(MaterialName));
            }
        }


        /// <summary>
        /// 注释:规格型号
        /// 可空:YES
        /// </summary>
        public String MaterialSpecification
        {
            get
            {
                return mWeighingBill.materialSpecification;
            }
            set
            {
                mWeighingBill.materialSpecification = value;
                OnPropertyChanged(this, nameof(MaterialSpecification));
            }
        }
        /// <summary>
        /// 注释:派车单ID
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int64? SendCarBillId
        {
            get { return mWeighingBill.sendCarBillId; }
            set { mWeighingBill.sendCarBillId = value; OnPropertyChanged(this, nameof(SendCarBillId)); }
        }

        /// <summary>
        /// 注释:派车单编号
        /// 可空:YES
        /// </summary>

        public String SendCarBillNumber
        {
            get { return mWeighingBill.sendCarBillNumber; }
            set { mWeighingBill.sendCarBillNumber = value; OnPropertyChanged(this, nameof(SendCarBillNumber)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String Remark
        {
            get { return mWeighingBill.remark; }
            set { mWeighingBill.remark = value; OnPropertyChanged(this, nameof(Remark)); }
        }

        /// <summary>
        /// 注释:扣重说明
        /// 可空:YES
        /// </summary>

        public String DecuationDescription
        {
            get { return mWeighingBill.decuationDescription; }
            set { mWeighingBill.decuationDescription = value; OnPropertyChanged(this, nameof(DecuationDescription)); }
        }

        /// <summary>
        /// 注释:扣重
        /// 可空:YES
        ///默认值:0.00
        /// </summary>

        public Decimal? DecuationWeight
        {
            get { return mWeighingBill.decuationWeight; }
            set { mWeighingBill.decuationWeight = value; OnPropertyChanged(this, nameof(DecuationWeight)); }
        }

        /// <summary>
        /// 注释:磅差
        /// 可空:YES
        ///默认值:0.000
        /// </summary>

        public Decimal? DiffWeight
        {
            get { return mWeighingBill.diffWeight; }
            set { mWeighingBill.diffWeight = value; OnPropertyChanged(this, nameof(DiffWeight)); }
        }

        /// <summary>
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int64? CarId
        {
            get { return mWeighingBill.carId; }
            set { mWeighingBill.carId = value; OnPropertyChanged(this, nameof(CarId)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String CarNumber
        {
            get { return mWeighingBill.carNumber; }
            set { mWeighingBill.carNumber = value; OnPropertyChanged(this, nameof(CarNumber)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String Driver
        {
            get { return mWeighingBill.driver; }
            set { mWeighingBill.driver = value; OnPropertyChanged(this, nameof(Driver)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String DriverMobile
        {
            get { return mWeighingBill.driverMobile; }
            set { mWeighingBill.driverMobile = value; OnPropertyChanged(this, nameof(DriverMobile)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String DriverIdNumber
        {
            get { return mWeighingBill.driverIdNumber; }
            set { mWeighingBill.driverIdNumber = value; OnPropertyChanged(this, nameof(DriverIdNumber)); }
        }

        /// <summary>
        /// 注释:打印次数
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? PrintTimes
        {
            get { return mWeighingBill.printTimes ?? 0; }
            set { mWeighingBill.printTimes = value; OnPropertyChanged(this, nameof(PrintTimes)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public DateTime? PrintDateTime
        {
            get { return mWeighingBill.printDateTime; }
            set { mWeighingBill.printDateTime = value; OnPropertyChanged(this, nameof(PrintDateTime)); }
        }

        /// <summary>
        /// 注释:数据同步时间
        /// 可空:YES
        /// </summary>

        public Int64? SyncTime
        {
            get { return mWeighingBill.syncTime; }
            set { mWeighingBill.syncTime = value; OnPropertyChanged(this, nameof(SyncTime)); }
        }

        /// <summary>
        /// 注释:所属公司
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int64? AffiliatedCompanyId
        {
            get { return mWeighingBill.affiliatedCompanyId; }
            set { mWeighingBill.affiliatedCompanyId = value; OnPropertyChanged(this, nameof(AffiliatedCompanyId)); }
        }

        /// <summary>
        /// 注释:收货状态 0未收 1 已收
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? ReceiveStatus
        {
            get { return mWeighingBill.receiveStatus; }
            set { mWeighingBill.receiveStatus = value; OnPropertyChanged(this, nameof(ReceiveStatus)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public DateTime? AddTime
        {
            get { return mWeighingBill.addTime; }
            set { mWeighingBill.addTime = value; OnPropertyChanged(this, nameof(AddTime)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? AddUserId
        {
            get { return mWeighingBill.addUserId; }
            set { mWeighingBill.addUserId = value; OnPropertyChanged(this, nameof(AddUserId)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String AddUserName
        {
            get { return mWeighingBill.addUserName; }
            set { mWeighingBill.addUserName = value; OnPropertyChanged(this, nameof(AddUserName)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public DateTime? LastUpdateTime
        {
            get { return mWeighingBill.lastUpdateTime; }
            set { mWeighingBill.lastUpdateTime = value; OnPropertyChanged(this, nameof(LastUpdateTime)); }
        }

        /// <summary>
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? IsDelete
        {
            get { return mWeighingBill.isDelete; }
            set { mWeighingBill.isDelete = value; OnPropertyChanged(this, nameof(IsDelete)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public DateTime? DeleteTime
        {
            get { return mWeighingBill.deleteTime; }
            set { mWeighingBill.deleteTime = value; OnPropertyChanged(this, nameof(DeleteTime)); }
        }

        /// <summary>
        /// 注释:删除原因
        /// 可空:YES
        /// </summary>

        public String DeleteReason
        {
            get { return mWeighingBill.deleteReason; }
            set { mWeighingBill.deleteReason = value; OnPropertyChanged(this, nameof(DeleteReason)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? LastUpdateUserId { get { return mWeighingBill.lastUpdateUserId; } set { mWeighingBill.lastUpdateUserId = value; OnPropertyChanged(this, nameof(LastUpdateUserId)); } }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String LastUpdateUserName
        {
            get { return mWeighingBill.lastUpdateUserName; }
            set { mWeighingBill.lastUpdateUserName = value; OnPropertyChanged(this, nameof(LastUpdateUserName)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? ReceiveCompanyId
        {
            get { return mWeighingBill.receiveCompanyId; }
            set { mWeighingBill.receiveCompanyId = value; OnPropertyChanged(this, nameof(ReceiveCompanyId)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String ReceiveCompanyName
        {
            get { return mWeighingBill.receiveCompanyName; }
            set { mWeighingBill.receiveCompanyName = value; OnPropertyChanged(this, nameof(ReceiveCompanyName)); }
        }

        /// <summary>
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int64? ReceiveYardId
        {
            get { return mWeighingBill.receiveYardId; }
            set { mWeighingBill.receiveYardId = value; OnPropertyChanged(this, nameof(ReceiveYardId)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String ReceiveYardName
        {
            get { return mWeighingBill.receiveYardName; }
            set { mWeighingBill.receiveYardName = value; OnPropertyChanged(this, nameof(ReceiveYardName)); }
        }

        /// <summary>
        /// 注释:数据类型 0 测试数据 1生产数据
        /// 可空:YES
        ///默认值:1
        /// </summary>

        public Int32? DataType
        {
            get { return mWeighingBill.dataType; }
            set { mWeighingBill.dataType = value; OnPropertyChanged(this, nameof(DataType)); }
        }

        /// <summary>
        /// 注释:税费数据的ID （0 没有 >0 有税费数据）
        /// 可空:NO
        ///默认值:0
        /// </summary>

        public Int64 TaxesBillId
        {
            get { return mWeighingBill.taxesBillId; }
            set { mWeighingBill.taxesBillId = value; OnPropertyChanged(this, nameof(TaxesBillId)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? PriceId
        {
            get { return mWeighingBill.priceId; }
            set { mWeighingBill.priceId = value; OnPropertyChanged(this, nameof(PriceId)); }
        }

        /// <summary>
        /// 注释:单价
        /// 可空:NO
        ///默认值:0.000
        /// </summary>

        public Decimal Price
        {
            get { return mWeighingBill.price; }
            set
            {
                mWeighingBill.price = value;
                OnPropertyChanged(this, nameof(Price));
            }
        }

        /// <summary>
        /// 注释:总金额
        /// 可空:YES
        ///默认值:0.000
        /// </summary>

        public Decimal? TotalMoney
        {
            get { return mWeighingBill.totalMoney; }
            set
            {
                mWeighingBill.totalMoney = value;
                OnPropertyChanged(this, nameof(TotalMoney));
            }
        }
        public Decimal? ReceiveMoney
        {
            get { return mWeighingBill.receiveMoney; }
            set
            {
                mWeighingBill.receiveMoney = value;
                OnPropertyChanged(this, nameof(ReceiveMoney));
            }
        }
        public MoneyType MoneyType
        {
            get { return (MoneyType)(mWeighingBill.moneyType ?? 0); }
            set
            {
                mWeighingBill.moneyType = (int)value;
                OnPropertyChanged(this, nameof(MoneyType));
            }
        }

        /// <summary>
        /// 注释:单位 吨或千克
        /// 可空:YES
        /// </summary>

        public String UnitText
        {
            get { return mWeighingBill.unitText; }
            set
            {
                mWeighingBill.unitText = value;
                OnPropertyChanged(this, nameof(UnitText));
            }
        }


        /// <summary>
        /// 注释:是否交换公司信息
        /// </summary>
        public Boolean? IsChangeCompany
        {
            get { return mWeighingBill.isChangeCompany; }
            set
            {
                mWeighingBill.isChangeCompany = value;
                OnPropertyChanged(this, nameof(IsChangeCompany));
            }
        }

        public Int64 HouseId
        {
            get
            {
                return mWeighingBill.houseId;
            }
            set
            {
                mWeighingBill.houseId = value;
                OnPropertyChanged(this, nameof(HouseId));
            }
        }
        /// <summary>
        /// 注释:磅房名称
        /// 可空:YES
        /// </summary>

        public String HouseName
        {
            get
            {
                return mWeighingBill.houseName;
            }
            set
            {
                mWeighingBill.houseName = value;
                OnPropertyChanged(this, nameof(HouseName));
            }
        }

        /// <summary>
        /// 注释:合同ID
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int64? ContractId
        {
            get
            {
                return mWeighingBill.contractId;
            }
            set
            {
                mWeighingBill.contractId = value;
                OnPropertyChanged(this, nameof(ContractId));
            }
        }

        /// <summary>
        /// 注释:合同编号
        /// 可空:YES
        /// </summary>

        public String ContractNumber
        {
            get
            {
                return mWeighingBill.contractNumber;
            }
            set
            {
                mWeighingBill.contractNumber = value;
                OnPropertyChanged(this, nameof(ContractNumber));
            }
        }

        /// <summary>
        /// 注释:是否已经更新合同签订的数量
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Boolean? IsInfluenceContract
        {
            get
            {
                return mWeighingBill.isInfluenceContract;
            }
            set
            {
                mWeighingBill.isInfluenceContract = value;
                OnPropertyChanged(this, nameof(IsInfluenceContract));
            }
        }

        /// <summary>
        /// 注释:是否更新库存
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Boolean? IsAffectInventory
        {
            get
            {
                return mWeighingBill.isAffectInventory;
            }
            set
            {
                mWeighingBill.isAffectInventory = value;
                OnPropertyChanged(this, nameof(IsAffectInventory));
            }
        }

        /// <summary>
        /// 物流单号
        /// </summary>
        public string LogisticsNumber
        {
            get { return mWeighingBill.logisticsNumber; }
            set
            {
                mWeighingBill.logisticsNumber = value;
                OnPropertyChanged(this, nameof(LogisticsNumber));
            }
        }

        #region 备用字段

        /// <summary>
        /// 注释:备用字符字段1
        /// 可空:YES
        /// </summary>

        public String BackupString1
        {
            get
            {
                return mWeighingBill.backupString1;
            }
            set
            {
                mWeighingBill.backupString1 = value;
                OnPropertyChanged(this, nameof(BackupString1));
            }
        }

        /// <summary>
        /// 注释:备用字符字段2
        /// 可空:YES
        /// </summary>

        public String BackupString2
        {
            get
            {
                return mWeighingBill.backupString2;
            }
            set
            {
                mWeighingBill.backupString2 = value;
                OnPropertyChanged(this, nameof(BackupString2));
            }
        }

        /// <summary>
        /// 注释:备用字符字段3
        /// 可空:YES
        /// </summary>

        public String BackupString3
        {
            get
            {
                return mWeighingBill.backupString3;
            }
            set
            {
                mWeighingBill.backupString3 = value;
                OnPropertyChanged(this, nameof(BackupString3));
            }
        }

        /// <summary>
        /// 注释:备用字符字段4
        /// 可空:YES
        /// </summary>

        public String BackupString4
        {
            get
            {
                return mWeighingBill.backupString4;
            }
            set
            {
                mWeighingBill.backupString4 = value;
                OnPropertyChanged(this, nameof(BackupString4));
            }
        }

        /// <summary>
        /// 注释:备用字符字段5
        /// 可空:YES
        /// </summary>

        public String BackupString5
        {
            get
            {
                return mWeighingBill.backupString5;
            }
            set
            {
                mWeighingBill.backupString5 = value;
                OnPropertyChanged(this, nameof(BackupString5));
            }
        }

        /// <summary>
        /// 注释:备用整形字段1
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? BackupInt1
        {
            get
            {
                return mWeighingBill.backupInt1;
            }
            set
            {
                mWeighingBill.backupInt1 = value;
                OnPropertyChanged(this, nameof(BackupInt1));
            }
        }

        /// <summary>
        /// 注释:备用整形字段2
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? BackupInt2
        {
            get
            {
                return mWeighingBill.backupInt2;
            }
            set
            {
                mWeighingBill.backupInt2 = value;
                OnPropertyChanged(this, nameof(BackupInt2));
            }
        }

        /// <summary>
        /// 注释:备用整形字段3
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? BackupInt3
        {
            get
            {
                return mWeighingBill.backupInt3;
            }
            set
            {
                mWeighingBill.backupInt3 = value;
                OnPropertyChanged(this, nameof(BackupInt3));
            }
        }

        /// <summary>
        /// 注释:备用整形字段4
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? BackupInt4
        {
            get
            {
                return mWeighingBill.backupInt4;
            }
            set
            {
                mWeighingBill.backupInt4 = value;
                OnPropertyChanged(this, nameof(BackupInt4));
            }
        }

        /// <summary>
        /// 注释:备用整形字段5
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? BackupInt5
        {
            get
            {
                return mWeighingBill.backupInt5;
            }
            set
            {
                mWeighingBill.backupInt5 = value;
                OnPropertyChanged(this, nameof(BackupInt5));
            }
        }

        /// <summary>
        /// 注释:备用数字字段1
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? BackupDecimal1
        {
            get
            {
                return mWeighingBill.backupDecimal1;
            }
            set
            {
                mWeighingBill.backupDecimal1 = value;
                OnPropertyChanged(this, nameof(BackupDecimal1));
            }
        }

        /// <summary>
        /// 注释:备用数字字段2
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? BackupDecimal2
        {
            get
            {
                return mWeighingBill.backupDecimal2;
            }
            set
            {
                mWeighingBill.backupDecimal2 = value;
                OnPropertyChanged(this, nameof(BackupDecimal2));
            }
        }

        /// <summary>
        /// 注释:备用数字字段3
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? BackupDecimal3
        {
            get
            {
                return mWeighingBill.backupDecimal3;
            }
            set
            {
                mWeighingBill.backupDecimal3 = value;
                OnPropertyChanged(this, nameof(BackupDecimal3));
            }
        }

        /// <summary>
        /// 注释:备用数字字段4
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? BackupDecimal4
        {
            get
            {
                return mWeighingBill.backupDecimal4;
            }
            set
            {
                mWeighingBill.backupDecimal4 = value;
                OnPropertyChanged(this, nameof(BackupDecimal4));
            }
        }

        /// <summary>
        /// 注释:备用数字字段5
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? BackupDecimal5
        {
            get
            {
                return mWeighingBill.backupDecimal5;
            }
            set
            {
                mWeighingBill.backupDecimal5 = value;
                OnPropertyChanged(this, nameof(BackupDecimal5));
            }
        }



        #endregion


        #region Text
        public string StatusText
        {
            get { return mWeighingBill.status == 1 ? "已完成" : "未完成"; }
        }
        public string MoneyTypeText
        {
            get
            {
                switch (MoneyType)
                {
                    case MoneyType.Cash:
                        return "现金";
                    case MoneyType.WeiXin:
                        return "微信";
                    case MoneyType.ZhiFuBao:
                        return "支付宝";
                }
                return "现金";
            }
        }

        public string TypeText
        {
            get
            {
                switch ((WeightingBillType)Type)
                {
                    case WeightingBillType.Buy:
                        return "采购";
                    case WeightingBillType.Sale:
                        return "销售";
                    case WeightingBillType.Self:
                        return "内部倒运";
                    case WeightingBillType.Foreign:
                        return "外来过磅";
                }
                return "其它";
            }
        }
        /// <summary>
        /// default weighing bill show type text
        /// </summary>
        public string BillTypeText
        {
            get
            {
                switch ((WeightingBillType)Type)
                {
                    case WeightingBillType.Buy:
                        return "(采购磅单)";
                    case WeightingBillType.Sale:
                        return "(销售磅单)";
                    case WeightingBillType.Self:
                        return "(内部倒运)";
                    case WeightingBillType.Foreign:
                        return "(外来过磅)";
                    case WeightingBillType.Mixture:
                        return "(过磅单)";
                }
                return "其它";
            }
        }


        public string GrossWeigherText
        {
            get
            {
                if (mWeighingBill.type == (int)WeightingBillType.Buy)
                {
                    return InUserName;
                }
                else if (mWeighingBill.type == (int)WeightingBillType.Sale)
                {
                    return OutUserName;
                }
                else
                {
                    return OutUserName;
                }

            }
        }

        public string TareWeigherText
        {
            get
            {
                if (mWeighingBill.type == (int)WeightingBillType.Buy)
                {
                    return OutUserName;
                }
                else if (mWeighingBill.type == (int)WeightingBillType.Sale)
                {
                    return InUserName;
                }
                else
                {
                    return OutUserName;
                }

            }
        }

        public string GrossScaleText
        {
            get
            {
                if (mWeighingBill.type == (int)WeightingBillType.Buy)
                {
                    return InScaleName;
                }
                else if (mWeighingBill.type == (int)WeightingBillType.Sale)
                {
                    return OutScaleName;
                }
                else
                {
                    return OutScaleName;
                }

            }
        }

        public string TareScaleText
        {
            get
            {
                if (mWeighingBill.type == (int)WeightingBillType.Buy)
                {
                    return OutScaleName;
                }
                else if (mWeighingBill.type == (int)WeightingBillType.Sale)
                {
                    return InScaleName;
                }
                else
                {
                    return OutScaleName;
                }

            }
        }

        public string UserNameText
        {
            get { return string.IsNullOrEmpty(OutUserName) ? InUserName : OutUserName; }
        }
        #endregion

    }
}
